package com.nyist.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

/**
 * @author yangxiaogen
 * @date 2021/1/23 17:02
 */
@RestController
@RequestMapping("/nacos/consumer")
@Slf4j
public class OrderController {

    @Value("${service-url.nacos-user-service}")
    public String serverURL;

    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("/get")
    public String getPay() {
        return restTemplate.getForObject(serverURL + "/ali/pay/nacosPort", String.class);
    }

    @GetMapping("/get")
    public String testGit() {
        return restTemplate.getForObject(serverURL + "/ali/pay/nacosPort", String.class);
    }

    @GetMapping("/get")
    public String gitTest() {
        return restTemplate.getForObject(serverURL + "/ali/pay/nacosPort", String.class);
    }
    // 左右同时merge,向中间


    //再次merge
    //
}
